/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.isd.global.dao;

import java.util.List;
import javax.ejb.Stateless;
import javax.ejb.LocalBean;
import com.isd.global.modelo.Sitio;

/**
 *
 * @author Claudio
 */
@Stateless
@LocalBean
public class SitioDAO extends BaseDAO {

    public void guardar(Sitio sitio)throws Exception{
        getEntityManager().persist(sitio);
    }

    public void editar(Sitio sitio)throws Exception{
        getEntityManager().merge(sitio);
    }

    public Sitio getSitio(String codigo){
        return  getEntityManager().find(Sitio.class, codigo);
    }

    public List<Sitio> getLista(){
        return getLista(Sitio.class, true, -1, -1);
    }
    
    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")
 
}
